/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package core.messages.client.inGame;

import models.CastInfo;

/**
 * 客户端发送的，是用卡片的Msg
 * @author Invince
 */
public class Msg_Card_Cast extends Msg_Cast{
/*----------Attributs-------------------*/
    /**
     * 卡片的id，之后到DataBase里的卡片列表里查询
     */
    protected int idCard;

/*----------Public functions------------*/
/*----------Private functions-----------*/
/*----------Constructor-----------------*/
    public Msg_Card_Cast(String sender, String receiver, int idSkill,int idSource, int[] idTargetPlayers,int[] idTargetCards,int idCard) {
        super(sender, receiver,idSkill, idSource, idTargetPlayers,idTargetCards);
        this.idCard = idCard;
    }

    public Msg_Card_Cast(String sender,String receiver,CastInfo castInfo){
        super(sender,receiver);
        this.idCard=castInfo.getCard().getId();
        this.idSkill=castInfo.getSkill().getId();
        this.idSource=castInfo.getSource().getId();
        for(int i=0;i<castInfo.getTargetPlayers().size();i++){
            this.idTargetPlayers[i]=castInfo.getTargetPlayers().get(i).getId();
        }
    }

/*----------Gets and sets---------------*/
    public int getIdCard() {
        return idCard;
    }

    public void setIdCard(int idCard) {
        this.idCard = idCard;
    }

}
